#include "iostream"
#include "fstream"

using namespace std;

int main(int argc, char const *argv[])
{
	ifstream range2process;
	int top, left, bottom, right;
	range2process.open("process_range.txt");
	range2process >> top >> left >> bottom >> right;
	range2process.close();

	ofstream run_file;
	run_file.open("tilemap_all");
	run_file << "#! /bin/bash\n\n";

	for (int sample = top; sample <= bottom; sample++ )
	{
		for (int line = left; line <= right; line++ )
		{
			run_file << "./tilemap3 sn h inv tp 06 27 " << line << " " << sample << endl;
		}
	}

	run_file.close();
	return 0;
}